<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/3/21 0021
 * Time: 00:18
 */

namespace Lib\Core;


class RpcServer
{
    public function listen($server, $tcp)
    {
        $listen = $server->listen($tcp['host'], $tcp['port'], SWOOLE_SOCK_TCP);
        $listen->set($tcp['swoole_setting']);
        $listen->on("receive", [$this, 'receive']);
    }

    public function receive()
    {
        //route->dispatch(); //分发到指定的服务当中
        //var_dump('222');
    }
}